-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[AArch64] Avoid warning about comparison of different signedness. NFC. #159337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This fixes the following warning when compiled with GCC: ../lib/Target/AArch64/AArch64ISelLowering.cpp: In function ‘bool shouldLowerTailCallStackArg(const llvm::MachineFunction&, const llvm::CCValAssign&, llvm::SDValue, llvm::ISD::ArgFlagsTy, int)’: ../lib/Target/AArch64/AArch64ISelLowering.cpp:9310: warning: comparison of integer expressions of different signedness: ‘uint64_t’ {aka ‘long unsigned int’} and ‘int64_t’ {aka ‘long int’} [-Wsign-compare] 9310 | if (SizeInBits / 8 != MFI.getObjectSize(FI)) |
@llvm/pr-subscribers-backend-aarch64 Author: Martin Storsjö (mstorsjo) ChangesThis fixes the following warning when compiled with GCC:
Full diff: https://github.com/llvm/llvm-project/pull/159337.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index f6389aad96bf8..4af0d2f089c23 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -9307,7 +9307,7 @@ static bool shouldLowerTailCallStackArg(const MachineFunction &MF,
if (CallOffset != MFI.getObjectOffset(FI))
return true;
uint64_t SizeInBits = LoadNode->getMemoryVT().getFixedSizeInBits();
- if (SizeInBits / 8 != MFI.getObjectSize(FI))
+ if (SizeInBits / 8 != static_cast<uint64_t>(MFI.getObjectSize(FI)))
return true;
return false;
}
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/138/builds/19212 Here is the relevant piece of the build log for the reference
|
This fixes the following warning when compiled with GCC: